#include "register_widget.h"
#include "ui_register_widget.h"

register_widget::register_widget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::register_widget),
    rip(new register_info)
{
    ui->setupUi(this);

    //全部clear
    ui->lineEditAccount->setClearButtonEnabled(true);
    ui->lineEditPassword->setClearButtonEnabled(true);
    ui->lineEditPasswordEnsure->setClearButtonEnabled(true);

    //密码隐藏
    ui->lineEditPassword->setEchoMode(QLineEdit::Password);
    ui->lineEditPasswordEnsure->setEchoMode(QLineEdit::Password);

    ConnectSlots();
}

register_widget::~register_widget()
{
    delete ui;
}

void register_widget::ConnectSlots()
{
    //注册按钮
    connect(ui->pushButtonRegister,
            SIGNAL(clicked()), this, SLOT(on_pushButtonRegister_clicked()));
}

void register_widget::on_pushButtonRegister_clicked()
{
    this->hide();
    rip->show();
}

